//点赞
import API from '../index.js'

//点赞
export function like(data) {
	const url=`/regular/likes/${data}`
    return API({
        url: url,
        method: 'post',
        data: data,
    })
}
//取消点赞
export function unlike(data) {
	const url=`/regular/likes/${data}`
    return API({
        url: url,
        method: 'delete',
        data: data,
    })
}

//文章id和用户id获取点赞状态
export function likeStatus(data) {
	const url=`/regular/likes/${data}`
    return API({
        url: url,
        method: 'get',
        data: data,
    })
}

//通过文章id获取点赞总数
export function likeCount(data) {
	const url=`/regular/likes/count/${data}`
    return API({
        url: url,
        method: 'get',
        data: data,
    })
}